<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<button onclick="funA()">funA</button>
<button onclick="funB()">funB</button>
<button onclick="funC()">funC</button>
</body>
</html>
<script>
    function funA() {
        for (let i = 0; i < 10; i++) {
            document.write(i + '<br/>')
        }
    }

    function funB() {
        let i = 9;
        while (i < 20) {
            document.write(i + '<br/>')
            i++
        }
    }

    function funC() {
        let i = 39
        do {
            document.write(i + '<br/>')
            i++
        } while (i < 58)
    }
</script>